package cn.xerllent.wxtp.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Set;

import javax.validation.constraints.NotBlank;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

@Data
@Accessors(chain = true)
@TableName (value="wxtp_corp")
public class WxCorp implements Serializable {

	private static final long serialVersionUID = 1L;

	@TableId(value = "id", type = IdType.AUTO)
	private Integer id;

	@TableField(value="corp_id")
	private String corpId;
	
	@TableField(value="suite_id")
	private String suiteId;

	@TableField(value="agent_id")
	private Integer agentId;
	
	@TableField(value="permanent_code")
	@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)  //仅输入，不输出
	private String permanentCode;
	
	@TableField(value="corp_name")
	private String corpName;
	
	@TableField(value="corp_full_name")
	private String corpFullName;
	
	@TableField(value="subject_type")
	private Integer subjectType;
	
	@TableField(value="verified_end_time")
	private LocalDateTime verifiedEndTime;
	
	/**
	 * 账户状态，-1为删除，禁用为0 启用为1
	 * */
	private Integer status;
	
	@TableField(fill = FieldFill.INSERT)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime createtime;

	@TableField(fill = FieldFill.INSERT_UPDATE,update = "now()")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime updatetime;
	
	private String wxpackage;
	
    public @interface Update {
    }

}